package com.dlc.felear.xiaoensale.entity;

import android.support.annotation.NonNull;

import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.table.DatabaseTable;

@DatabaseTable(tableName = "t_menu_material")
public class MenuFoodMaterial implements Comparable<MenuFoodMaterial>{
    @DatabaseField(columnName = "id",id = true)
    private String id;
    @DatabaseField()
    private String categoryId;
    @DatabaseField(columnName = "foodid")
    private int foodid;
    @DatabaseField(columnName = "cid")
    private String cid;
    @DatabaseField(columnName = "sid")
    private String sid;
    @DatabaseField(columnName = "pic")
    private String pic;
    @DatabaseField(columnName = "foodname")
    private String foodName;
    @DatabaseField(columnName = "weight")
    private long weight;
    @DatabaseField(columnName = "number")
    private int number;
    @DatabaseField(columnName = "type")
    private int type;

    public String getCategoryId() {
        return categoryId;
    }

    public void setCategoryId(String categoryId) {
        this.categoryId = categoryId;
    }

    public String getPic() {
        return pic;
    }

    public void setPic(String pic) {
        this.pic = pic;
    }

    public String getSid() {
        return sid;
    }

    public void setSid(String sid) {
        this.sid = sid;
    }

    public int getType() {
        return type;
    }


    public void setType(int type) {
        this.type = type;
    }

    public String getCid() {
        return cid;
    }

    public void setCid(String cid) {
        this.cid = cid;
    }

    public long getWeight() {
        return weight;
    }

    public void setWeight(long weight) {
        this.weight = weight;
    }

    public int getNumber() {
        return number;
    }

    public void setNumber(int number) {
        this.number = number;
    }

    public MenuFoodMaterial() {
    }
    public MenuFoodMaterial(String foodName) {
        this.foodName=foodName;
    }

    public int getFoodid() {
        return foodid;
    }

    public void setFoodid(int foodid) {
        this.foodid = foodid;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getFoodName() {
        return foodName;
    }

    public void setFoodName(String foodName) {
        this.foodName = foodName;
    }

    @Override
    public int compareTo(@NonNull MenuFoodMaterial o) {
        return this.getNumber()-o.getNumber();
    }
}
